package org.javaboy.system_task;

import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import java.util.Arrays;

@Component
@Order(-1)
public class MyCommandLineRunner01 implements CommandLineRunner {
    /**
     * 系统启动时候会触发这个方法
     * @param args 这个参数实际上就是 main 方法的参数
     * @throws Exception
     */
    @Override
    public void run(String... args) throws Exception {
        String s = Arrays.toString(args);
        System.out.println("s = " + s);
    }
}
